package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShoppingMapper;
import com.ruoyi.system.domain.Shopping;
import com.ruoyi.system.service.IShoppingService;

/**
 * 采购管理Service业务层处理
 * 
 * @author 张旭
 * @date 2024-09-05
 */
@Service
public class ShoppingServiceImpl implements IShoppingService 
{
    @Autowired
    private ShoppingMapper shoppingMapper;

    /**
     * 查询采购管理
     * 
     * @param shoppingSallerId 采购管理主键
     * @return 采购管理
     */
    @Override
    public Shopping selectShoppingByShoppingSallerId(Long shoppingSallerId)
    {
        return shoppingMapper.selectShoppingByShoppingSallerId(shoppingSallerId);
    }

    /**
     * 查询采购管理列表
     * 
     * @param shopping 采购管理
     * @return 采购管理
     */
    @Override
    public List<Shopping> selectShoppingList(Shopping shopping)
    {
        return shoppingMapper.selectShoppingList(shopping);
    }

    /**
     * 新增采购管理
     * 
     * @param shopping 采购管理
     * @return 结果
     */
    @Override
    public int insertShopping(Shopping shopping)
    {
        return shoppingMapper.insertShopping(shopping);
    }

    /**
     * 修改采购管理
     * 
     * @param shopping 采购管理
     * @return 结果
     */
    @Override
    public int updateShopping(Shopping shopping)
    {
        return shoppingMapper.updateShopping(shopping);
    }

    /**
     * 批量删除采购管理
     * 
     * @param shoppingSallerIds 需要删除的采购管理主键
     * @return 结果
     */
    @Override
    public int deleteShoppingByShoppingSallerIds(Long[] shoppingSallerIds)
    {
        return shoppingMapper.deleteShoppingByShoppingSallerIds(shoppingSallerIds);
    }

    /**
     * 删除采购管理信息
     * 
     * @param shoppingSallerId 采购管理主键
     * @return 结果
     */
    @Override
    public int deleteShoppingByShoppingSallerId(Long shoppingSallerId)
    {
        return shoppingMapper.deleteShoppingByShoppingSallerId(shoppingSallerId);
    }
}
